#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n;
	scanf("%d", &n);
	double arr[100][2];
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < 2; j++)
		{
			scanf("%lf", &arr[i][j]);
		}
	}
	double sum = 0;	double d = 0;
	int j = 0;
	for (int i = 0; i < n; i++)
	{
		sum += arr[i][j] * arr[i][j + 1];
		d += arr[i][0];
	}
	printf("%.6lf", sum/d);

	return 0;
}